package com.hundsun.finance.service;

import java.io.InputStream;

import org.tinygroup.tinyscript.tree.impl.TreeDataNode;

/**
 * 股票接口
 * @author yancheng11334
 *
 */
public interface StockService {

	/**
	 * 批量插入股票数据
	 * @param input
	 * @param encode
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  insertStocks(InputStream input,String encode) throws Exception;
	
	/**
	 * 获取股票列表
	 * @param startDT
	 * @param endDT
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  getStocks(String startDT,String endDT) throws Exception;
	
	/**
	 * 按周期统计股票信息
	 * @param period
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  countPeriod(String period) throws Exception;
	
	/**
	 * 统计一段时间内股票大涨/小涨/震荡/小跌/大跌的天数
	 * @param startDT
	 * @param endDT
	 * @param riseMax
	 * @param riseMin
	 * @param fallMin
	 * @param fallMax
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  countDays(String startDT,String endDT,Double riseMax,Double riseMin,Double fallMin,Double fallMax) throws Exception;
	
	/**
	 * 统计连续相同涨跌幅趋势的交易日
	 * @param limit
	 * @param rate
	 * @return
	 * @throws Exception
	 */
	TreeDataNode  countSeries(Integer limit,Double rate) throws Exception;
}
